<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="图片转ICO工具，将JPG/PNG/GIF/WEBP格式的图片转换为ICO格式，支持批量转换。">
    <link rel="icon" href="static/LOGO.png" type="image/x-icon">
    <title>图片转ICO工具</title>
    <link rel="stylesheet" href="static/style.css">
</head>
<body>
    <h1>图片转ICO工具</h1>
    
    <div class="container">
        <div class="upload-area">
            <div class="drag-drop" id="dragDrop">
                <svg class="upload-icon" viewBox="0 0 24 24">
                    <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
                </svg>
                <p>拖拽JPG/PNG/GIF/WEBP文件到此处上传或点击此处选择文件</p>
            </div>
            
        </div>
        
        <div class="preview">
            <h3>预览</h3>
            <img id="imagePreview" style="display: none;">
        </div>
        
        <div>
            <label for="sizeSelect">选择ICO尺寸:</label>
            <select id="sizeSelect">
                <option value="1024" selected>1024x1024</option>
                <option value="512">512x512</option>
                <option value="256">256x256</option>
                <option value="128">128x128</option>
                <option value="64">64x64</option>
                <option value="48">48x48</option>
                <option value="32">32x32</option>
                <option value="16">16x16</option>
            </select>
        </div>

        <div class="all-sizes-option">
            <input type="checkbox" id="allSizesCheckbox">
            <label for="allSizesCheckbox">全尺寸转换</label>
        </div>
        
        <button id="convertBtn">转换为ICO</button>
        
        <div class="success-area" id="successArea" style="display: none;">
            <h3 id="successTitle"></h3>
            <button id="downloadBtn">
                <svg class="download-icon" viewBox="0 0 24 24">
                    <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>
                </svg>
                下载ICO文件
            </button>
        </div>
    </div>
    
    <script src="static/jszip.min.js"></script>
    <script src="static/script.js"></script>
</body>
</html>